#include <stdio.h>
#include "templates.h"

void PrintHTTPResponseHeader(void)
{
	printf("Content-type: text/html;charset=utf-8\n\n");
}

void PrintHTMLStyles(void)
{
	printf("<link rel=\"stylesheet\" type=\"text/css\" href=\"/css/style.css\" />\n");
}

void PrintHTMLHead(const char * const htmlTitle, const char * const headLine, const char * const slogan)
{
	printf("<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n\"http://www.w3.org/TR/html4/loose.dtd\">\n");
	printf("<html>\n");
	printf("<head>\n");
	printf("<title>%s</title>\n", htmlTitle);
	PrintHTMLStyles();
	printf("</head>\n");
	printf("<body>\n");
	printf("<div class=\"fb_form\">\n");
	printf("<div class=\"form_h\">\n");
	printf("%s<br>\n", headLine);
	printf("</div>\n");
	printf("<div class=\"form_slogan\">\n");
	printf("%s\n", slogan);
	printf("</div>\n");
}

void PrintHTMLEnd(void)
{
	printf("</div>\n");
	printf("</body>\n");
	printf("</html>\n");
}